<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>媒体查询</title>
    <style>
         @media (max-width: 750px) {
            .media {
                height: 200px;
                width: 200px;
                margin: 0 auto;
                background: green;
            }
        }
        @media screen and (min-width: 750px) {
            .media {
                height: 100px;
                width: 100px;
                margin: 0 auto;
                background: red;
            }
        }

       
    </style>
</head>

<body>
    <div class="media">媒体查询</div>
</body>

</html>